<template>
  <div>
    <divider>{{examList[0].studentname}}</divider>
    <group>
      <cell @click.native="getScoreDetail(value,index)" v-for ="(value,index) in examList" v-bind:title="value.examName" is-link>
        详情
      </cell>
    </group>
  </div>
</template>
<script>
  import { Group, Cell, Divider } from 'vux'

  export default {
    components: {
      Group,
      Cell,
      Divider
    },
    created: function () {
      let studentid = this.$route.query.studentid
      this.$http.get('/jeewx/scoreController.do?scoreList&studentId=' + studentid)
       .then(function (res) {
         let json = JSON.parse(res.body.jsonStr)
         this.examList = json.obj
         console.log(this.examList[0].examName)
       }, function (res) {
         console.log(res)
       })
    },
    methods: {
      getScoreDetail (value, index) {
        this.$router.push({path: '/StudentScoreList', query: {score: value}})
      }
    },
    data () {
      return {
        jsonpUrl: String,
        examList: [],
        value: 'test'
      }
    }
  }
</script>

<style scoped>

</style>
